<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/10
 * Time: 13:39
 */

namespace app\index\model\area;


use basic\ModelBasic;
use think\Db;

class Area extends ModelBasic
{
    public static function tableName()
    {
        return 'area';
    }

    public static function GetAreaName($id,$select='name')
    {
        return Db::name(self::tableName())->where('id',$id)->value($select);
    }

    public static function GetAreaPid($id){
        return self::GetAreaName($id,'pid');
    }


    public static function GetAreaOne($id)
    {
        return Db::name(self::tableName())->where('id',$id)->find();
    }
}